﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Search.aspx.cs" Inherits="OrderManagement_Search" MasterPageFile="~/MasterPage.master" %>

 
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <title>订单查询</title>
    <link href="../resources/styles/style.css" type="text/css" rel="stylesheet" />
   
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div>
        <table id="wsd_inputtable">
            <tr>
                <td class="tabletitle" colspan="6">
                    搜索选项
                </td>
            </tr>
            <tr>
                <td class="tablefield">
                    客户类别:
                </td>
                <td nowrap="nowrap">
                    <asp:DropDownList runat="server" ID="ddlClass" Width="150">
                    </asp:DropDownList>
                </td>
                <td class="tablefield">
                    区域层次:
                </td>
                <td nowrap="nowrap">
                    <asp:DropDownList runat="server" ID="ddlLevel" meta:resourcekey="ddlLevelResource1"
                        Width="150">
                    </asp:DropDownList>
                </td>
                <td class="tablefield">
                    起始日期:
                </td>
                <td nowrap="nowrap">
                    <asp:TextBox runat="server" ID="txtStart"  class="default" ></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="tablefield">
                    经销商:
                </td>
                <td nowrap="nowrap">
                    <asp:DropDownList runat="server" ID="ddlChain" Width="150">
                    </asp:DropDownList>
                </td>
                <td class="tablefield">
                    销售渠道:
                </td>
                <td nowrap="nowrap">
                    <asp:DropDownList runat="server" ID="ddlChannel" Width="150">
                    </asp:DropDownList>
                </td>
                <td class="tablefield">
                    结束日期:
                </td>
                <td nowrap="nowrap">
                    <asp:TextBox runat="server" ID="txtEnd"  class="default"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="tablefield">
                    订单类型:
                </td>
                <td nowrap="nowrap">
                    <asp:DropDownList runat="server" ID="ddlOrderType" Width="150">
                    </asp:DropDownList>
                </td>
                <td class="tablefield">
                    巡店督导:
                </td>
                <td nowrap="nowrap">
                    <asp:DropDownList runat="server" ID="ddlUser" Width="150">
                    </asp:DropDownList>
                </td>
                <td class="tablefield">
                    订单状态:
                </td>
                <td nowrap="nowrap">
                    <asp:DropDownList runat="server" ID="ddlStatus" Width="150">
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td class="tablefield">
                    门店名称或代码:
                </td>
                <td nowrap="nowrap">
                    <asp:TextBox runat="server" ID="txtCode"></asp:TextBox>
                </td>
                <td class="tablefield">
                    有效
                </td>
                <td nowrap="nowrap">
                    <asp:DropDownList ID="drpCancelled" runat="server">
                        <asp:ListItem Value="">--所有--</asp:ListItem>
                        <asp:ListItem Value="N">有效</asp:ListItem>
                        <asp:ListItem Value="Y">无效</asp:ListItem>
                    </asp:DropDownList>
                </td>
                <td class="buttonarea" colspan="2">
                    <asp:Button ID="btnQuery" runat="server" class="wsd_button2" Text="查  询" OnClick="btnQuery_Click" />
                    &nbsp;&nbsp;
                    <input type="button" class="wsd_button2" size="47" value="重  置" name="reset" onclick="clearForm('form1')" />
                </td>
            </tr>
        </table>
        <br />
        <table id="wsd_inputtable">
            <tr>
                <td class="tabletitle">
                    订单列表
                </td>
               
            </tr>
        </table>
        <table id="wsd_listtable" width="100%">
            <tr>
                <td style="width: 100%">
                    <asp:GridView Width="100%" ID="gvChannelType" runat="server" AutoGenerateColumns="false"
                        EmptyDataText="没有可显示的数据." EmptyDataRowStyle-Font-Bold="true" EmptyDataRowStyle-HorizontalAlign="Center"
                        EnableEmptyContentRender="true" OnRowDataBound="Grid_RowDataBound" AllowPaging="True"
                        PageSize="20" OnPageIndexChanging="gvChannelType_PageIndexChanging">
                        <HeaderStyle CssClass="titlist" />
                        <EmptyDataRowStyle HorizontalAlign="Center" Font-Bold="True"></EmptyDataRowStyle>
                        <Columns>
                            <asp:HyperLinkField DataNavigateUrlFormatString="Order_Maintain.aspx?orderID={0}&customerID={1}"
                                DataNavigateUrlFields="ORDER_ID,CUSTOMER_ID" DataTextField="ORDER_NO" HeaderText="订单号码" />
                            <asp:TemplateField HeaderText="订单类型">
                                <ItemTemplate>
                                    <asp:Label runat="server" ID="lblOrderType" Text='<%# Jumpton.SFA.Server.Entity.ORDER_HEADERS.GetOrderType(Convert.ToInt32(Eval("OrderType"))) %>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:BoundField HeaderText="门店名称" DataField="CUSTOMER_NAME" />
                            <asp:BoundField HeaderText="巡店督导" DataField="USER_NAME" />
                            <asp:BoundField HeaderText="订单日期" DataField="ORDER_date" DataFormatString="{0:d}" />
                            <asp:BoundField HeaderText="要求发货日期" DataField="REQ_DELIVERY_date" DataFormatString="{0:d}" />
                            <asp:BoundField HeaderText="仓库" DataField="ShipFrom" />
                            <asp:TemplateField HeaderText="订单状态">
                                <ItemTemplate>
                                    <asp:Label runat="server" ID="lblStatusDescription" Text='<%# Jumpton.SFA.Server.Entity.ORDER_HEADERS.GetStatusDescription(Convert.ToInt32(Eval("STATUS"))) %>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:BoundField HeaderText="备注" DataField="ADDITIONAL_INFO" />
                            <asp:BoundField HeaderText="有效" DataField="CANCELLED" />
                        </Columns>
                        <RowStyle CssClass="evenline" />
                        <AlternatingRowStyle CssClass="oddline" />
                        <PagerSettings FirstPageText="首页" LastPageText="尾页" Mode="NumericFirstLast" PageButtonCount="30" />
                    </asp:GridView>
                </td>
            </tr>
        </table>
        <br />
        <table id="wsd_inputtable">
            <tr>
                <td class="tabletitle">
                    操作选项
                </td>
            </tr>
            <tr>
                <td class="buttonarea">
                    <asp:Button ID="Button1" runat="server" class="wsd_button2" Text="新　增" OnClick="btnNew_Click" />
                </td>
            </tr>
        </table>
    </div>
 </asp:Content>
